package com.tiancheng.trade.settlement.service.settlement;

import com.tiancheng.trade.commom.core.data.PageInfo;
import com.tiancheng.trade.settlement.exception.BusinessException;
import com.tiancheng.trade.settlement.model.settlement.SettlementBillResult;
import com.tiancheng.trade.settlement.vo.settlement.admin.*;
import com.tiancheng.trade.settlement.vo.settlement.admin.res.AbnormalDataResVO;
import com.tiancheng.trade.settlement.vo.settlement.admin.res.StatementProductResVO;
import com.tiancheng.trade.settlement.vo.settlement.admin.res.SuccessBillResVO;
import com.tiancheng.trade.settlement.vo.settlement.api.GetBillDetailVO;
import com.tiancheng.trade.settlement.vo.settlement.api.SettlementBillDetail;
import com.tiancheng.trade.settlement.vo.settlement.api.SettlementBillDetailVO;
import com.tiancheng.trade.settlement.vo.settlement.api.SettlementBillRepVO;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface ISettlementBillResultService {

    /**
     * 清分对账-清分汇总统计信息
     *
     * @param billRepVO
     * @return
     */
    PageInfo<SettlementBillRepVO> getSettlementBillReport(SettlementBillQueryVO billRepVO);


    /**
     * 清分对账-清分汇总统计导出
     *
     * @param billRepVO
     */
    void exportSettlementBillReport(SettlementBillQueryVO billRepVO, HttpServletRequest request, HttpServletResponse response) throws IOException;

    /**
     * 清分对账-明细对账信息
     *
     * @param detailVO
     * @return
     */
    PageInfo<SettlementBillDetailVO> billDetailList(GetBillDetailVO detailVO);

    /**
     * 清分对账-明细对账信息导出
     *
     * @param billRepVO
     */
    void exportSettlementBillDetail(GetBillDetailVO billRepVO, HttpServletRequest request, HttpServletResponse response) throws IOException;

    /**
     * 按id查询清分对账明细详情
     *
     * @param id
     * @return
     */
    SettlementBillDetail settlementBillDetailById(String id);

    /**
     * 按清分日期/子订单/费用类型 查询对账明细信息
     *
     * @param billResult
     * @return
     */
    List<SettlementBillResult> billResultList(SettlementBillResult billResult);

    /**
     * 按id查询对账结果信息
     *
     * @param id
     * @return
     */
    SettlementBillResult billResultById(String id);

    /**
     * 按子订单编号查询订单信息
     *
     * @param subOrderId
     * @return
     */
    List<SettlementBillResult> billResultByOrderId(String subOrderId);

    /**
     * 成功对账表
     *
     * @param queryVO
     * @return
     * @throws BusinessException
     */
    PageInfo<SuccessBillResVO> querySuccessBill(SuccessBillQueryVO queryVO) throws BusinessException;

    /**
     * 清分对账-汇总对账 -列表
     *
     * @param queryVO
     * @return
     */
    PageInfo<SettlementReconRepVO> getSettlementReconReport(SettlementReconQueryVO queryVO) throws BusinessException;

    /**
     * 清分对账-汇总对账 -导出
     *
     * @param queryVO
     * @return
     */
    void exportSettlementReconReport(SettlementReconQueryVO queryVO, HttpServletRequest request, HttpServletResponse response) throws IOException;

    /**
     * 成功对账单导出
     *
     * @param queryVO
     * @param request
     * @param response
     * @throws BusinessException
     * @throws IOException
     */
    void successBillexport(SuccessBillQueryVO queryVO, HttpServletRequest request, HttpServletResponse response) throws BusinessException, IOException;

    PageInfo<AbnormalDataResVO> queryAbnormalDataList(AbnormalDataQueryVO abnormalDataQueryVO) throws BusinessException;

    /**
     * 查询需生成对账函的产品信息
     *
     * @param queryVO
     * @return
     */
    List<StatementProductResVO> queryStatementAccount(StatementAccountCreateVO queryVO);

    /**
     * 查询需生成对账函的产品信息
     *
     * @param queryVO
     * @return
     */
    List<StatementProductResVO> queryStatementProduct(StatementAccountCreateVO queryVO);

    /**
     * 按id查询对账结果
     *
     * @param ids
     * @return
     */
    List<AbnormalDataResVO> getResultByIds(List<String> ids);

}
